package ui;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

public class Warning extends Composite {

	/**
	 * Create the composite.
	 * @param parent
	 * @param style
	 */
	public Warning(Composite parent, int style) {
		super(parent, style);
		setBackground(SWTResourceManager.getColor(SWT.COLOR_RED));
		
		Button btnNewButton = new Button(this, SWT.NONE);
		btnNewButton.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
			}
		});
		btnNewButton.setFont(SWTResourceManager.getFont("Times New Roman", 30, SWT.NORMAL));
		btnNewButton.setBounds(282, 216, 69, 56);
		btnNewButton.setText("OK");
		
		Label lblWarning = new Label(this, SWT.NONE);
		lblWarning.setBackground(SWTResourceManager.getColor(SWT.COLOR_YELLOW));
		lblWarning.setFont(SWTResourceManager.getFont("Times New Roman", 35, SWT.NORMAL));
		lblWarning.setAlignment(SWT.CENTER);
		lblWarning.setBounds(10, 10, 341, 53);
		lblWarning.setText("WARNING:");
		
		Label lblLowBattery = new Label(this, SWT.NONE);
		lblLowBattery.setText("Low Battery");
		lblLowBattery.setFont(SWTResourceManager.getFont("Times New Roman", 35, SWT.BOLD));
		lblLowBattery.setBackground(SWTResourceManager.getColor(SWT.COLOR_RED));
		lblLowBattery.setAlignment(SWT.CENTER);
		lblLowBattery.setBounds(10, 98, 341, 53);
		
		Label lblPleaseConnectTo = new Label(this, SWT.NONE);
		lblPleaseConnectTo.setText("Please connect to charger to prevent loss of services.");
		lblPleaseConnectTo.setFont(SWTResourceManager.getFont("Times New Roman", 16, SWT.NORMAL));
		lblPleaseConnectTo.setBackground(SWTResourceManager.getColor(SWT.COLOR_RED));
		lblPleaseConnectTo.setAlignment(SWT.CENTER);
		lblPleaseConnectTo.setBounds(10, 157, 341, 53);

	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}

}
